﻿#include "CmdLineChartSidebarDataOperationChanged.h"
#include <QFile>
#include <QDebug>
#include "BaseModule/IBaseSignal.h"
#include "PostCommandPy.h"

namespace PostCommand
{
    CmdLineChartSidebarDataOperationChanged::CmdLineChartSidebarDataOperationChanged()
        : CommandBase()
    {
        this->initCmdName();
    }
    CmdLineChartSidebarDataOperationChanged::~CmdLineChartSidebarDataOperationChanged()
    {
    }

    bool CmdLineChartSidebarDataOperationChanged::execute()
    {
        // bool _success = false;
        emit IBaseSignalInstance->signal_lineChartSidebarDataOperationChanged(m_mainWindowId, m_isNormChecked, m_isDBChecked, m_isMathOperationChecked);
        return true;
    }

    void CmdLineChartSidebarDataOperationChanged::undo()
    {
    }

    void CmdLineChartSidebarDataOperationChanged::redo()
    {
        // execute();
    }

    void CmdLineChartSidebarDataOperationChanged::setLineChartSidebarDataOperationChanged(int mainWindowId, bool isNormChecked, bool isDBChecked, bool isMathOperationChecked)
    {
        m_mainWindowId = mainWindowId;
        m_isNormChecked = isNormChecked;
        m_isDBChecked = isDBChecked;
        m_isMathOperationChecked = isMathOperationChecked;
    }

} // namespace PostCommand
